<%@ page contentType="text/html; charset=UTF-8"%>
<%  
      String filePath = "/nianshen.rar";   
      String fileName = "nianshen.rar"; 
      System.out.println(filePath);     
      System.out.println(fileName);    
      if(fileName!=null&&filePath!=null){   
          response.setContentType("application/x-download");   
          response.addHeader("Content-Disposition","attachment;filename=" + java.net.URLEncoder.encode(fileName,"UTF-8"));   
  
          try{   
  
              out.clear();   
  
              out=pageContext.pushBody();    
  
          }catch(Throwable e){   
  
              e.printStackTrace();   
  
          }   
  
          try{   
  
              RequestDispatcher dis = application.getRequestDispatcher(filePath);   
  
              dis.forward(request,response);   
  
          }catch(Throwable e){   
  
              e.printStackTrace();   
  
          }finally{   
  
              response.flushBuffer();   
  
          }   
  
      }   
  
%>